using System.Threading.Tasks;

namespace DocumentCreationSystem.Services
{
    /// <summary>
    /// 占位后端：先回显提示，便于在未安装依赖前跑通架构
    /// </summary>
    public class StubRWKVBackend : IRWKVBackend
    {
        private string? _modelPath;
        public Task LoadModelAsync(string modelPath)
        {
            _modelPath = modelPath;
            return Task.CompletedTask;
        }
        public Task UnloadAsync() => Task.CompletedTask;

        public Task<string> GenerateAsync(string prompt, int maxTokens, float temperature)
        {
            var msg = $"[StubRWKVBackend] 本地推理未接入实际后端。模型: {_modelPath ?? "未加载"}\n提示: {prompt.Substring(0, System.Math.Min(prompt.Length, 120))}...";
            return Task.FromResult(msg);
        }
    }
}

